wayland: don't change the cursor if there is no pointer
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Mon, 23 Jun 2014 16:21:08 +0000 (18:21 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 28 Jun 2014 04:12:20 +0000 (00:12 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=732206

gdk/wayland/gdkdevice-wayland.c

index 327c12483ea8d30f952599c26e6a1508481affe9..9471d31b5bcfd836d4d2749005a2458fb98804fd 100644 (file)
@@ -183,6 +183,10 @@ gdk_wayland_device_update_window_cursor (GdkWaylandDeviceData *wd)
 
   buffer = _gdk_wayland_cursor_get_buffer (wd->cursor, wd->cursor_image_index,
                                            &x, &y, &w, &h, &scale);
+
+  if (!wd->wl_pointer)
+    return FALSE;
+
   wl_pointer_set_cursor (wd->wl_pointer,
                          wd->enter_serial,
                          wd->pointer_surface,